import java.util.Random;

public class RandomStringGenerator {
	String delimiter="-";
	String randomString;
	String[] alphabetBase = {"a", "b", "c", "d", "e", "f","g","h","i","j"};
	String[] alphabet;
	public RandomStringGenerator(int alphabetSize, int randomStringLength) {
		alphabet = new String[alphabetSize];
		generateAlphabet(alphabetSize);
		generateRandomString(randomStringLength);
		System.out.println("\n\n");
	}
	
	void generateAlphabet(int numberOfCharacterStrings){
		int i = 0;
		while(i < numberOfCharacterStrings){
			int alphabetBaseIndex = i%10;
			StringBuilder stringBuilder = new StringBuilder(alphabetBase[alphabetBaseIndex]);
			int j = 0;
			int repeats = i/10;
			while(j < repeats ){
				stringBuilder.append(alphabetBase[alphabetBaseIndex]);
				j++;
			}
			alphabet[i] = stringBuilder.toString();
			i++;
		}
	}
	
	public void displayGeneratedAlphabet(){
		int i = 0;
		while(i < alphabet.length){
			System.out.println("stringCharacter at index " + i + " is: " + alphabet[i]);
			i++;
		}
	}
	
	public void generateRandomString(int randomStringLength) {
		StringBuilder stringBuilder = new StringBuilder();
		Random random = new Random();
		int i = 0;
		while(i < randomStringLength){
			stringBuilder.append(alphabet[random.nextInt(alphabet.length)]);
			stringBuilder.append(delimiter);
			i++;
		}
		randomString = stringBuilder.toString();
	}
}
